package cs3343.project.family.testing;

import static org.junit.Assert.*;

import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JOptionPane;

import cs3343.project.family.*;
import cs3343.project.family.Character;

import org.junit.Test;

public class mapTest {

	/* Draft only
	 
	// error found 1 
	// Expected result : player is on the mapArea 0
	// max.mapid=20
	// test whether current mapID+diceValue = rightMapid && Not do oral card will deduct -50
	@Test
	public void movementTest() {
		int diceValue=4;
		int currentArea=8;
		int endMapArea=12;
		int orginalEsteem=250;
		
		class YesNoFrameStub extends YesNoFrame{

			}
			};

		// about players' settings
		int numPlayer=5;
		int currentPlayerIdx=2;
		StartGame start=new StartGame();
		start.selectedPlayer=numPlayer;

		// random gen 1 player & set their esteem to 250
		String proimgPath = ConfigManager.IMAGE_PATH + "profilePic1" + ".jpg";
        String iconimgPath = ConfigManager.IMAGE_PATH + "char1" + ".jpg";
		// Constructor(String name, char gender, int mapAreaId, ImageIcon image, ImageIcon icon, int esteem)
        Character player = new Character("Player",'F', currentArea, new ImageIcon(proimgPath), new ImageIcon(iconimgPath),orginalEsteem);
        start.character[currentPlayerIdx]=player;
        start.character[currentPlayerIdx].setEsteem(orginalEsteem);
        start.character[currentPlayerIdx].setMapAreaId(currentArea);

      //  InitGame g=new InitGame();
        
        InitGame.setCurPlayer(currentPlayerIdx);
      // set character icon on the map  
        JLabel[] icon = new JLabel[numPlayer];
        icon[currentPlayerIdx] = new JLabel(StartGame.character[currentPlayerIdx].getIcon());
        
        // icon XY will not test in this case. random set
        icon[currentPlayerIdx].setBounds(0, 0, 100, 100);
        
        
		DiceController dice=new DiceController();

		dice.diceAction(diceValue);
		
		int result=start.character[currentPlayerIdx].getMapAreaId();
		
		assertEquals(result,0);

		
	}
	 	*/
}
